package com.gxa.ehome.exception;


import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

//ControllerAdvice：当前的异常处理类变成了全局异常处理器
@ControllerAdvice
public class ExceptionController {

    //Throwable：监控所有的异常类型
    @ExceptionHandler(Throwable.class)
    public String handle(Exception e){
        e.printStackTrace();
        System.out.println("Exception Handle");
        return "";

    }


}
